﻿
/*----------------------------------------------------------------//
// 文件名：MoTfiles.cs
// 文件功能描述：实体 MoTfiles.
// 
// 创建标识：Template  ver 5.0.20090429 2009-11-22
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoTfiles
using System;
using System.Data;
namespace EQT.Model
{
    /// <summary>
    /// 业务实体MoTfiles
    /// </summary>
    public partial class MoTfiles : ICloneable
    {
        #region 表Tfiles的字段
        private string fileId;
        private long fileLength;
        private string fileUrl;
        private string fileName;
        private DateTime fileCreateTime;
        private string creatorId;
        private string frem;
        private string class1;
        #endregion

        #region 构造函数
        public MoTfiles()
        {
            fileCreateTime = new DateTime(1900, 1, 1);

        }
        #endregion

        #region 拷贝构造函数

        public MoTfiles(MoTfiles item)
        {
            item.CopyTo(this);
        }
        #endregion

        #region 带参数构造函数
        public MoTfiles(string fileId, long fileLength, string fileUrl, string fileName, DateTime fileCreateTime, string creatorId, string frem, string class1)
        {
            this.fileId = fileId;
            this.fileLength = fileLength;
            this.fileUrl = fileUrl;
            this.fileName = fileName;
            this.fileCreateTime = fileCreateTime;
            this.creatorId = creatorId;
            this.frem = frem;
            this.class1 = class1;
        }
        #endregion

        #region 表Tfiles的字段属性
        /// <summary>
        /// FILE_ID
        /// </summary>
        public string FileId
        {
            get { return fileId; }
            set { fileId = value; }
        }
        /// <summary>
        /// FILE_LENGTH
        /// </summary>
        public long FileLength
        {
            get { return fileLength; }
            set { fileLength = value; }
        }
        /// <summary>
        /// FILE_URL
        /// </summary>
        public string FileUrl
        {
            get { return fileUrl; }
            set { fileUrl = value; }
        }
        /// <summary>
        ///不含目录，包括扩展名
        /// </summary>
        public string FileName
        {
            get { return fileName; }
            set { fileName = value; }
        }
        /// <summary>
        /// FILE_CREATE_TIME
        /// </summary>
        public DateTime FileCreateTime
        {
            get { return fileCreateTime; }
            set { fileCreateTime = value; }
        }
        /// <summary>
        /// CREATOR_ID
        /// </summary>
        public string CreatorId
        {
            get { return creatorId; }
            set { creatorId = value; }
        }
        /// <summary>
        /// FREM
        /// </summary>
        public string Frem
        {
            get { return frem; }
            set { frem = value; }
        }
        /// <summary>
        /// CLASS1
        /// </summary>
        public string Class1
        {
            get { return class1; }
            set { class1 = value; }
        }
        #endregion

        #region 辅助函数
        /// <summary>
        /// 拷贝函数
        /// </summary>
        public MoTfiles CopyTo(MoTfiles item)
        {
            item.fileId = this.fileId;
            item.fileLength = this.fileLength;
            item.fileUrl = this.fileUrl;
            item.fileName = this.fileName;
            item.fileCreateTime = this.fileCreateTime;
            item.creatorId = this.creatorId;
            item.frem = this.frem;
            item.class1 = this.class1;
            return item;
        }
        /// <summary>
        /// 克隆函数
        /// </summary>		
        public object Clone()
        {
            MoTfiles mo = new MoTfiles();
            mo.FileId = this.FileId;
            mo.FileLength = this.FileLength;
            mo.FileUrl = this.FileUrl;
            mo.FileName = this.FileName;
            mo.FileCreateTime = this.FileCreateTime;
            mo.CreatorId = this.CreatorId;
            mo.Frem = this.Frem;
            mo.Class1 = this.Class1;
            return mo;
        }
        ///<summary>
        ///判断对象是否相等
        ///<summary>
        public override bool Equals(object obj)
        {
            if (object.ReferenceEquals(this, obj))
            {
                return true;
            }
            else
            {
                MoTfiles NewTfiles = obj as MoTfiles;
                if (NewTfiles == null)
                {
                    return false;
                }
                else
                {
                    if (NewTfiles.FileId == this.FileId && NewTfiles.FileLength == this.FileLength && NewTfiles.FileUrl == this.FileUrl && NewTfiles.FileName == this.FileName && NewTfiles.FileCreateTime == this.FileCreateTime && NewTfiles.CreatorId == this.CreatorId && NewTfiles.Frem == this.Frem && NewTfiles.Class1 == this.Class1)
                    {
                        return true;
                    }
                }

            }
            return false;

        }
        ///TODO:you should modify GetHashCode by yourself.
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return String.Format(System.Globalization.CultureInfo.InvariantCulture, "FileId={0}/FileLength={1}/FileUrl={2}/FileName={3}/FileCreateTime={4}/CreatorId={5}/Frem={6}/Class1={7}", fileId, fileLength, fileUrl, fileName, fileCreateTime, creatorId, frem, class1);

        }
        #endregion


        #region DataTable Help Function
        ///<summary>
        ///DataRow转换成Model
        ///</summary>
        public void Row2Model(DataRow row)
        {
            if (row["File_ID"] != null && row["File_ID"] != DBNull.Value)
            {
                this.FileId = (string)row["File_ID"];
            }
            else
            {
                this.FileId = string.Empty;
            }
            if (row["File_Length"] != null && row["File_Length"] != DBNull.Value)
            {
                this.FileLength = (long)row["File_Length"];
            }
            else
            {
                this.FileLength = 0;
            }
            if (row["File_URL"] != null && row["File_URL"] != DBNull.Value)
            {
                this.FileUrl = (string)row["File_URL"];
            }
            else
            {
                this.FileUrl = string.Empty;
            }
            if (row["File_Name"] != null && row["File_Name"] != DBNull.Value)
            {
                this.FileName = (string)row["File_Name"];
            }
            else
            {
                this.FileName = string.Empty;
            }
            if (row["File_Create_Time"] != null && row["File_Create_Time"] != DBNull.Value)
            {
                this.FileCreateTime = (DateTime)row["File_Create_Time"];
            }
            else
            {
                this.FileCreateTime = DateTime.MinValue;
            }
            if (row["Creator_ID"] != null && row["Creator_ID"] != DBNull.Value)
            {
                this.CreatorId = (string)row["Creator_ID"];
            }
            else
            {
                this.CreatorId = string.Empty;
            }
            if (row["FRem"] != null && row["FRem"] != DBNull.Value)
            {
                this.Frem = (string)row["FRem"];
            }
            else
            {
                this.Frem = string.Empty;
            }
            if (row["Class1"] != null && row["Class1"] != DBNull.Value)
            {
                this.Class1 = (string)row["Class1"];
            }
            else
            {
                this.Class1 = string.Empty;
            }
        }

        ///<summary>
        ///Model转换成DataRow
        ///</summary>
        public void Model2Row(DataRow row)
        {
            row["File_ID"] = this.FileId;
            row["File_Length"] = this.FileLength;
            row["File_URL"] = this.FileUrl;
            row["File_Name"] = this.FileName;
            row["File_Create_Time"] = this.FileCreateTime;
            row["Creator_ID"] = this.CreatorId;
            row["FRem"] = this.Frem;
            row["Class1"] = this.Class1;
        }
        #endregion
    }
}
#endregion
